package com.jxb;

import java.lang.reflect.TypeVariable;

import com.jxb.service.UserService;

/**
 * 类注释
 *
 * @author jiaobo
 * @date Created in 2024/11/19 20:48
 **/
public class GenTest {

    public static void main(String[] args) {
        UserService userService = new UserService();
        String typeName = userService.getClass().getGenericSuperclass().getTypeName();
        System.out.println(typeName);
        for (TypeVariable<? extends Class<?>> typeParameter :
                userService.getClass().getSuperclass().getTypeParameters()) {
            System.out.println(typeParameter.getName());
        }
    }

}
